package com.felix.dao;

import java.util.List;
import java.util.Map;

import com.felix.bean.Carshare;
import com.felix.bean.Favor;
import com.felix.bean.Relation;
import com.felix.bean.Temp_mess_list;
import com.felix.bean.User;
import com.felix.bean.Vote;
import com.g3net.database.DbException;
import com.g3net.tool.PageBean;

public interface QueryDao {
	public User queryUser(String uname,String pwd);
	
	public User queryUserById(int uid);
	
	public Favor queryFavor(int uid,int cid);
	
	public List<Map<String, Object>> queryHotCity(int size) throws Exception;
	
	public List<Carshare> queryCarShare(Map<String,String[]> param,PageBean pb) throws DbException;
	
	public List<Carshare> queryMyCarShare(Map<String,String[]> param,PageBean pb) throws DbException;
	
	public List<Carshare> queryMyPinChe(Map<String,String[]> param,PageBean pb) throws DbException;
	
	public List<String> queryGotime(Map<String,String[]> param)throws DbException, Exception;

    public Carshare queryCarshareInfo(int cid) throws DbException; 
    
    public String queryVoteScore(int oid) throws Exception;
    
    public Carshare queryCarshare(Carshare csh) throws DbException; 
    
    public List<User> queryShareJoiner(int cid,int pid) throws DbException;
    
    public List<User> queryMyShareJoiner(String cidStr) throws DbException;
    
    public List<Carshare> querySubCarShare(int pid) throws DbException;
    
    public List<Carshare> queryFavors(Map<String,String[]> param,PageBean pb) throws DbException;
    
    public List<String> queryFavorGotime(Map<String,String[]> param) throws Exception;

    public int checkRegist(String phone)throws Exception;
    
    public int checkVote(int uid,int oid)throws Exception;
    
    public List<Temp_mess_list> queryCartList(int uid)throws DbException;
    
    public int queryLeftSit(int cid)throws DbException;
    
    public int queryUnRead(Temp_mess_list temp) throws DbException;
    
    public int queryAllUnRead(int uid) throws Exception;
    
    public Relation queryRelation(int cid,int driver,int passage) throws DbException;
    
    public List<String> queryCityName(String code);
    
}
